# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: main.py
# Time: 16:11

import os

import pytest


from common.utils.file_util import get_time_report, get_sub_dir

class MainRun():
    def __init__(self):
        self.allure = os.path.join(get_time_report(), "allure")
        self.allure_report = os.path.join(get_time_report(), "allure_report")

    def run(self):
        pytest.main(["-s", "-v", get_sub_dir("case"), "--alluredir", self.allure])
        os.system(f"allure generate {self.allure} -o {self.allure_report} --clean")


if __name__ == '__main__':
    MainRun().run()